#define _CRT_SECURE_NO_WARNINGS
#include<stdio.h>
int main()
{
	/*int i = 1;
	int n = 0;
	int t = 2;
	scanf("%d", &n);
	for (i = 1; t <= n; t++)
	{
		i = i * t;
	}
	printf("%d", i);
	return 0;*/
	int s = 0;
	int i = 1;
	int ret = 1;
    int sum = 0;
	int arr[10] = { 1,2,3,4,5,6,7,8,9,10 };
	for (s = 0; s < 10; s++)
	{
		for (i = 1,ret=1; i <= arr[s]; i++)
		{
			ret = i * ret;
		}
		sum = sum + ret;
	}
	printf("%d\n", sum);
			return 0;
}